/*
 * Copyright 2006 Brian Watkins
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */


package bw.weather;

import java.util.*;
import bw.util.Format;

public class WeatherReport
{
    private String _location = "";
    private String _temp = "";
    private String _feelsLikeTemp = "";
    private String _weatherDesc = "";
    private Vector _forecast = new Vector();
    private Date _time = null;
    private String _error = null;

    public WeatherReport ()
    {
        _time = new Date();
    }

    public void setLocation ( String loc ) { _location = loc; }
    public String getLocation () { return _location; }

    public void setTemp ( String temp ) { _temp = temp; }
    public String getTemp () { return _temp; }
    
    public Date getTime () { return _time; }
    public String getTimeStr () { return Format.formatDate( _time ); }

    public void setFeelsLikeTemp ( String temp ) { _feelsLikeTemp = temp; }
    public String getFeelsLikeTemp () { return _feelsLikeTemp; }

    public void setWeatherDesc ( String desc ) { _weatherDesc = desc; }
    public String getWeatherDesc () { return _weatherDesc; }

    public void setError ( String error ) { _error = error; }
    public String getError () { return _error; }
    public boolean hasError ()
    {
        return ( _error != null && _error.length() > 0 );
    }

    public void addDailyForecast ( DailyForecastInfo info )
    {
        _forecast.addElement( info );
    }

    public Iterator getForecast ()
    {
        return _forecast.iterator();
    }
}